package com.campus.entity;

import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;

@Data
public class PostDetailDTO {
    private String postId;
    private String userId;
    private String categoryId;
    private String title;
    private String content;
    private String images;  // 修改为String类型，存储JSON字符串
    private String tags;
    private Integer likesCount;
    private Integer commentsCount;
    private Integer viewsCount;
    private Integer sharesCount;
    private BigDecimal hotScore;
    private Boolean isTop;
    private Boolean isEssence;
    private Boolean status;
    private Date createTime;
    private Date updateTime;
    private String username;
    // 用户信息
    private UserDetail user;
    
    // 分类信息
    private CategoryDetail category;
    
    // 用户是否已点赞
    private Boolean isLiked = false;
    
    @Data
    public static class UserDetail {
        private String userId;
        private String username;
        private String nickname;
        private String avatar;
    }
    
    @Data
    public static class CategoryDetail {
        private String categoryId;
        private String categoryName;
        private String icon;
        private String color;
    }
}